“Quality Control of M-CTSU Time To Activation (TTA)”

Reading in Data

We will start by reading in data received from Kate Huffman from May 4, 2021. Then clean up variable names, then clean up messy excel dates, then remove calculated fields. The result is saved as the object, ttadata.

ttadata <- readxl::read_excel("Time to Activation 5.4.2021.xlsx", sheet = "Time to Activation 5.4.21") %>% 
  clean_names() %>% # clean names, then dates
  mutate(irb_final_approval = excel_numeric_to_date(as.numeric(irb_final_approval)), irb_application_submitted = excel_numeric_to_date(as.numeric(irb_application_submitted)),
  billing_calendar_received = excel_numeric_to_date(as.numeric(billing_calendar_received)),
   care_designations_completed = excel_numeric_to_date(as.numeric(care_designations_completed)),
  internal_budget_finished = excel_numeric_to_date(as.numeric(internal_budget_finished)),     
  pi_approved_budget = excel_numeric_to_date(as.numeric(pi_approved_budget)),   budget_negotiations_start = excel_numeric_to_date(as.numeric(budget_negotiations)),  final_budget = excel_numeric_to_date(as.numeric(final_budget)),          paf_routed = excel_numeric_to_date(as.numeric(paf_routed)), 
    contract_executed= excel_numeric_to_date(as.numeric(contract_executed)),      pan_released = excel_numeric_to_date(as.numeric(pan_released)),           open_to_accrual = excel_numeric_to_date(as.numeric(open_to_accrual))
    ) %>% # now clean up prior math
  select(-feasibility_approval_to_irb_application_submitted) %>% 
  select(-feasibility_approval_to_internal_budget_finished) %>% 
  select(-budget_negotiations_to_final_budget) %>% 
  select(-feasibility_approval_to_paf_routed) %>% 
  select(-budget_negotiations) %>% # clean up dates
  mutate(feasibility_approval = as.Date(as.POSIXct(feasibility_approval,tz="Detroit"))) %>% mutate(intake_form_completed = as.Date(as.POSIXct(intake_form_completed,tz="Detroit"))) %>%#now relocate cols
  relocate(.after = "irb_application_submitted", "irb_final_approval" ) %>% 
  relocate(.after = "billing_calendar_received", "internal_budget_finished", "pi_approved_budget", "budget_negotiations_start", "final_budget")
## Warning in excel_numeric_to_date(as.numeric(irb_final_approval)): NAs introduced
## by coercion
## Warning in excel_numeric_to_date(as.numeric(irb_application_submitted)): NAs
## introduced by coercion
## Warning in excel_numeric_to_date(as.numeric(billing_calendar_received)): NAs
## introduced by coercion
## Warning in excel_numeric_to_date(as.numeric(care_designations_completed)): NAs
## introduced by coercion
## Warning in excel_numeric_to_date(as.numeric(internal_budget_finished)): NAs
## introduced by coercion
## Warning in excel_numeric_to_date(as.numeric(pi_approved_budget)): NAs introduced
## by coercion
## Warning in excel_numeric_to_date(as.numeric(budget_negotiations)): NAs
## introduced by coercion
## Warning in excel_numeric_to_date(as.numeric(final_budget)): NAs introduced by
## coercion
## Warning in excel_numeric_to_date(as.numeric(paf_routed)): NAs introduced by
## coercion
## Warning in excel_numeric_to_date(as.numeric(contract_executed)): NAs introduced
## by coercion
## Warning in excel_numeric_to_date(as.numeric(pan_released)): NAs introduced by
## coercion
## Warning in excel_numeric_to_date(as.numeric(open_to_accrual)): NAs introduced by
## coercion

Exploring Missing Data (NAs)

visdat::vis_dat(ttadata)

Calculating Intervals in Days

Now we will add variables for calculated intervals in days. Start with intake to feasibility approval.

ttadata <- ttadata %>% 
  mutate(time_intake_feasibility = as.numeric(feasibility_approval - intake_form_completed)) %>% 
  mutate(time_feasibility_irbsubm=as.numeric(irb_application_submitted - feasibility_approval)) %>% 
  mutate(time_irbsubm_irbfinal = as.numeric(irb_final_approval - irb_application_submitted)) %>% 
  mutate(time_bcrecvd_feasibility=as.numeric(feasibility_approval - billing_calendar_received)) %>% 
  mutate(time_bcrecvd_intbudgdone=as.numeric(internal_budget_finished - billing_calendar_received)) %>% 
  mutate(time_intbudgfinal_piapp=as.numeric(pi_approved_budget - internal_budget_finished)) %>% 
  mutate(time_piapp_budgetnegstart=as.numeric(budget_negotiations_start - pi_approved_budget)) %>% 
  mutate(time_budgetnegstart_finalbudget=as.numeric(final_budget - budget_negotiations_start)) %>% 
  mutate(time_piappbudg_budgetnegstart=as.numeric(final_budget - budget_negotiations_start)) %>% 
  mutate(time_irbfinal_pafrouted=as.numeric(irb_final_approval - paf_routed)) %>% 
  mutate(time_finalbudg_pafrouted=as.numeric(paf_routed - final_budget)) %>% 
  mutate(time_pafrouted_panreleased=as.numeric(pan_released - paf_routed)) %>% 
  mutate(time_panrel_open2accrual=as.numeric(open_to_accrual - pan_released)) %>% 
  mutate(time_contrexec_panrel=as.numeric(pan_released - contract_executed)) %>%  mutate(time_finalbudget_contrexec=as.numeric(contract_executed - final_budget)) %>%
  mutate(time_feasib_contrexec=as.numeric(contract_executed - feasibility_approval)) %>%
  mutate(time_irbfinal_contrexec=as.numeric(contract_executed - irb_final_approval))

ttadata %>% ggplot(aes(time_intake_feasibility)) + geom_histogram(binwidth = 5)
## Warning: Removed 1 rows containing non-finite values (stat_bin).

Consider filtering by sponsor_type = “Industry”

Consider faceting by CTSU

Testing out the ggQC package

Start with a XmR plot of the interval from intake to feasibility approval.

ttadata %>% 
  drop_na(intake_form_completed, time_intake_feasibility) %>% 
  arrange(intake_form_completed) %>% 
ggplot(aes(x = intake_form_completed-17897, 
           y = time_intake_feasibility)) + #init ggplot
  geom_point() + geom_line() + #add the points and lines
  stat_QC(method = "XmR", #specify QC charting method
      auto.label = T, # Use Autolabels
      label.digits = 2, #Use two digit in the label
      show.1n2.sigma = T  #Show 1 and two sigma lines
          ) +  
  stat_QC(method="mR") +
  scale_x_continuous(expansion(mult = 1.15)) + # Pad the x-axis
  labs(x = "Days Since Jan 1, 2019",
       y = "Time from Intake Form to Feasibility Approval")
## Warning: Computation failed in `stat_mr()`:
## arguments imply differing number of rows: 228, 311

## Warning: Computation failed in `stat_mr()`:
## arguments imply differing number of rows: 228, 311

Now try a QC violations plot.

QC_Violations <- 
  ggplot(ttadata, aes(x = intake_form_completed, y = time_intake_feasibility)) + #init ggplot
  stat_qc_violations(method = "XmR" 
       #show.facets = 4 #if you just want facet 4
                     )
QC_Violations
## Warning: Removed 12 rows containing missing values (geom_hline).
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Warning: Removed 4 rows containing missing values (geom_point).

Testing the Runcharter package

Runcharter with time from intake to feasibility approval

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_intake_feasibility,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from Intake Form to Feasibility Approval",
            chart_subtitle = "Industry Trials only",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry   85.0 2019-01-08 2019-02-05 2021-01-04  baseline
## 2:     Industry   46.5 2021-01-04 2021-01-14 2021-04-07 sustained

Runcharter with time to IRB submission

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_feasibility_irbsubm,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from Feasibility Approval to IRB Submission",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 59 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry   46.0 2019-01-08 2019-02-05 2020-08-07  baseline
## 2:     Industry   20.5 2020-08-07 2020-08-17 2021-04-07 sustained

Runcharter with Time at IRB

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_irbsubm_irbfinal,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from IRB Submission to Final Approval",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 124 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to run_type
## 1:     Industry     68 2019-01-08 2019-02-05 2021-04-07 baseline

Runcharter with time to IRB submission

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_feasibility_irbsubm,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from Feasibility Approval to IRB Submission",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 59 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry   46.0 2019-01-08 2019-02-05 2020-08-07  baseline
## 2:     Industry   20.5 2020-08-07 2020-08-17 2021-04-07 sustained

Runcharter with Time from Billing Calendar Received to Internal Budget Done

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_bcrecvd_intbudgdone,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from Billing Calendar Received to Internal Budget Done",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 58 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry   21.0 2019-01-08 2019-02-05 2020-07-16  baseline
## 2:     Industry   39.5 2020-07-16 2020-08-07 2020-12-21 sustained
## 3:     Industry   18.0 2020-12-21 2021-01-21 2021-04-07 sustained

Rncharter with Time from billing calendar received to Internal Budget Done

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_bcrecvd_feasibility,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from Feasibility Approval to Billing Calendar Received",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 31 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry  -10.0 2019-01-08 2019-02-05 2019-02-14  baseline
## 2:     Industry  -14.0 2019-02-14 2019-02-28 2020-11-11 sustained
## 3:     Industry  -21.5 2020-11-11 2020-12-21 2021-04-07 sustained

Runcharter with Time from Internal Budget Done to PI approval

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_intbudgfinal_piapp,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from Internal Budget Done to PI approval",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 65 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry      1 2019-01-08 2019-02-05 2019-04-02  baseline
## 2:     Industry      0 2019-04-02 2019-05-09 2019-05-14 sustained
## 3:     Industry      8 2019-05-14 2019-06-03 2019-09-18 sustained
## 4:     Industry      0 2019-09-18 2019-09-30 2019-10-01 sustained
## 5:     Industry      7 2019-10-01 2019-10-17 2019-10-18 sustained
## 6:     Industry      1 2019-10-18 2019-11-11 2021-04-07 sustained

Runcharter with Time from PI approval of internal budget to start budget negotiation

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_piappbudg_budgetnegstart,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from PI approval to Start of Budget Negotiations",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 121 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry   67.5 2019-01-08 2019-02-05 2019-02-28  baseline
## 2:     Industry   10.5 2019-02-28 2019-03-15 2019-05-29 sustained
## 3:     Industry   64.5 2019-05-29 2019-06-12 2020-02-11 sustained
## 4:     Industry   23.0 2020-02-11 2020-02-28 2020-09-08 sustained
## 5:     Industry   46.0 2020-09-08 2020-11-03 2021-04-07 sustained

Runcharter with Time from Start of Budget Negotiation to Final Budget

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_budgetnegstart_finalbudget,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from Start of Budget Negotiations to Final Budget",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 121 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry   67.5 2019-01-08 2019-02-05 2019-02-28  baseline
## 2:     Industry   10.5 2019-02-28 2019-03-15 2019-05-29 sustained
## 3:     Industry   64.5 2019-05-29 2019-06-12 2020-02-11 sustained
## 4:     Industry   23.0 2020-02-11 2020-02-28 2020-09-08 sustained
## 5:     Industry   46.0 2020-09-08 2020-11-03 2021-04-07 sustained

Runcharter with Time from Final Budget to Contract Executed

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_finalbudget_contrexec,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from Final Budget to Contract Executed",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 207 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry   91.0 2019-01-08 2019-02-05 2019-06-03  baseline
## 2:     Industry   29.0 2019-06-03 2019-07-23 2019-09-23 sustained
## 3:     Industry   96.5 2019-09-23 2019-10-09 2020-02-18 sustained
## 4:     Industry   27.0 2020-02-18 2020-03-23 2021-04-07 sustained

Runcharter with Time from Final IRB to PAF routed

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_irbfinal_pafrouted,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from Final IRB to PAF Routed",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 134 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry     34 2019-01-08 2019-02-05 2020-08-07  baseline
## 2:     Industry    -36 2020-08-07 2020-09-08 2021-04-07 sustained

Runcharter with Time from Final IRB to Contract Executed

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_irbfinal_contrexec,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from Final IRB to Contract Executed",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 213 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry    124 2019-01-08 2019-02-05 2019-06-03  baseline
## 2:     Industry      6 2019-06-03 2019-07-23 2021-04-07 sustained

Runcharter with Time from PAF Routed to PAN Releaased

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval =  time_pafrouted_panreleased,
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from PAF Routed to PAN Released",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 148 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to run_type
## 1:     Industry     79 2019-01-08 2019-02-05 2021-04-07 baseline

Runcharter with Time from Contract Executed to PAN Releaased

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_contrexec_panrel, 
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from Contract Executed to PAN Released",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 216 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry    0.0 2019-01-08 2019-02-05 2019-06-03  baseline
## 2:     Industry   37.5 2019-06-03 2019-07-24 2020-02-11 sustained
## 3:     Industry   14.0 2020-02-11 2020-02-26 2021-04-07 sustained

Runcharter with Time from Feasibility Approved to Contract Executed

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_feasib_contrexec, 
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from Feasibility Approval to Contract Executed",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 204 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry    398 2019-01-08 2019-02-05 2019-06-03  baseline
## 2:     Industry    165 2019-06-03 2019-07-23 2020-03-17 sustained
## 3:     Industry     92 2020-03-17 2020-04-27 2021-04-07 sustained

Runcharter with Time from PAN Released to Open To Accrual

ttadata %>% runcharter(
          med_rows = 15,
          runlength = 8,
          direction = "both", 
          grpvar = sponsor_type,
          datecol = intake_form_completed,
          yval = time_panrel_open2accrual, 
           line_colr = "gray80",
           line_size = 0.5,
           point_colr = "cadetblue",
           highlight_fill = "yellow",
           highlight_point_size = 1.5,
           point_size = 1,
            chart_title = "Time from PAN Release to Open to Accrual",
            chart_subtitle = "Industry Trials only",
            chart_breaks = "3 month",
            labs(y = "Days"))
## Warning: Coercing `ncol` to be an integer.
## Warning in sanitise_dim(ncol): NAs introduced by coercion
## Warning: `ncol` is missing or less than 1 and will be treated as NULL.
## $runchart
## Warning: Removed 170 rows containing missing values (geom_point).

## 
## $sustained
##    sponsor_type median start_date   end_date  extend_to  run_type
## 1:     Industry   55.0 2019-01-08 2019-02-05 2019-04-23  baseline
## 2:     Industry   10.0 2019-04-23 2019-05-20 2019-07-31 sustained
## 3:     Industry   62.0 2019-07-31 2019-09-09 2020-02-11 sustained
## 4:     Industry    5.5 2020-02-11 2020-02-28 2021-04-07 sustained